﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OptionalContentPlaceHolderTests.aspx.cs" Inherits="OpenWaves.Web.Tests.OptionalContentPlaceHolderTests" MasterPageFile="TestCase.master"%>
<asp:Content runat="server" ID="TestCase" ContentPlaceHolderID="TestCasePlaceHolder">
    <div>
        <h1>OptionalContent, DataItem == null</h1>
        <ow:OptionalContentPlaceholder runat="server" DataItem="<%#null%>">
            <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
        </ow:OptionalContentPlaceholder>
    </div>
    <div>
        <h1>OptionalContent, DataItem != null</h1>
        <ow:OptionalContentPlaceholder runat="server" DataItem="<%#new object()%>">
            <p>This should be bound: <%#DateTime.Now%></p>
        </ow:OptionalContentPlaceholder>
    </div>
    <div>
        <h1>OptionalContent with Fallback, DataItem == null</h1>
        <ow:OptionalContentWithFallbackPlaceholder runat="server" DataItem="<%#null%>">
            <Content>
                <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
            </Content>
            <FallbackContent>
                <p>This should be bound: <%#DateTime.Now%></p>
            </FallbackContent>
        </ow:OptionalContentWithFallbackPlaceholder>
    </div>
    <div>
        <h1>OptionalContent with Fallback, DataItem != null</h1>
        <ow:OptionalContentWithFallbackPlaceholder runat="server" DataItem="<%#DateTime.Now%>">
            <Content><p>This should be bound: <%#DateTime.Now%></p></Content>
            <FallbackContent>
                <p>This should not be rendered or bound <%#((object) null).ToString()%></p>
            </FallbackContent>
        </ow:OptionalContentWithFallbackPlaceholder>
    </div>
</asp:Content>